/*
 *  SerialisedFont.h
 *
 *  Created by David Rowland on 20/11/2008.
 *  Copyright 2008 UWE. All rights reserved.
 *
 */

#include <juce/juce.h>
#include "BitwiseFontResource.h"

class SerialisedFont : public Font
{
	private:
	
	public:
	Font* bitwiseFont;
	
	SerialisedFont()
	{
		bitwiseFont = 0;
		MemoryInputStream fontStream (bitwiseFontResource::bitwiseFontBinary, bitwiseFontResource::bitwiseFontBinary_Size, false);
		Typeface* bitwiseTypeface = new Typeface (fontStream);
		bitwiseFont = new Font (*bitwiseTypeface);
		
		
		// Because the font stores it's own typeface
		delete bitwiseTypeface;
	}
	
	~SerialisedFont()
	{
		deleteAllChildren();
	}
};